<template>
  <tm-app>
    <tm-text fontSize="60" class="text-weight-b px-24 my-n12">{{
      $trans(
        `${
          currentStep === 0
            ? "pages.register.stepOne"
            : "pages.register.stepTow"
        }`
      )
    }}</tm-text>
    <!-- Step 1 -->
    <Step_1 v-if="currentStep === 0" @next="currentStep = 1" />
    <!-- Step 2 -->
    <Step_2 v-if="currentStep === 1" />

    <tm-row justify="center" class="mt-n10">
      <tm-text color="#282c37">{{
        $trans("pages.register.hasAccount")
      }}</tm-text>
      <tm-text color="danger" class="ml-n5" @click="toLogin">{{
        $trans("pages.register.login")
      }}</tm-text>
    </tm-row>
  </tm-app>
</template>

<script lang="ts" setup>
import Step_1 from "./components/step1.vue"
import Step_2 from "./components/step2.vue"
const currentStep = ref(0)

const toLogin = () => {
  uni.redirectTo({
    url: "/pages/login/index",
  })
}
</script>

<style lang="scss">
page {
  background-color: #fff;
}
</style>
